package group.program.Controller;

import group.program.Service.SqlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;
import java.util.List;

@RestController
public class SqlController {
    @Autowired
    private SqlService sqlService;
    @GetMapping("sql")
    public List<LinkedHashMap<String,Object>> sql(String sql){
        return sqlService.getData(sql);
    }
}
